package com.ruoyi.housing.controller;

import com.ruoyi.housing.service.HousingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author 小智
 * @PachageName:com.ruoyi.housing.controller
 * @ClassName :HousingController
 * @Description:
 * @date 2021/07/22 9:32
 */
@RestController
@RequestMapping("/housing")
public class HousingController {


    @Autowired
    HousingService housingService;


    @RequestMapping("list")
    public Object list(@RequestBody Map<String,Object> params)
    {
        return housingService.list(params);
    }

    @RequestMapping("test")
    public String demo(){
        return "你好";
    }


    /**
     * @Author 小智
     * @Description //TODO
     * @Date 9:39 2021/07/26
     * @Param * @param null
     * @return boolean
     **/
    @RequestMapping("updateId")
    public boolean updateId(String id){
        return housingService.updateById(id);
    }

    @RequestMapping("updateById")
    public boolean updateById(String id){
        return housingService.updateById0(id);
    }



}
